package com.github.boluo1230.wechat.service.mp;

import com.github.boluo1230.wechat.entity.MpApp;
import com.github.boluo1230.wechat.entity.QrAutoReplyInfo;
import com.github.boluo1230.wechat.entity.WxUser;
import com.github.boluo1230.wechat.entity.vo.MpAutoReplyInfo;
import com.github.boluo1230.wechat.entity.vo.WxAccessToken;

import java.util.List;

/**
 * @author Code Farmer
 * @date 2019/10/14 15:38
 */
public interface RedisService {

    WxUser getWxUser(String appId, String openId);

    void setWxUser(String appId, String openId, WxUser wxUser);

    QrAutoReplyInfo getCachedMpAppQrAutoReplyConfig(String appId, String eventKey);

    void setCachedMpAppQrAutoReplyConfig(String appId, String eventKey, QrAutoReplyInfo qrAutoReplyInfo);

    MpAutoReplyInfo getCachedMpAppAutoReplyConfig(String appId);

    void cacheMpAppAutoReplyConfig(MpAutoReplyInfo mpAutoReplyInfo);

    WxAccessToken getAccessToken(String appId);

    void setAccessToken(String appId, WxAccessToken wxAccessToken);

    List<MpApp> getAllMpApp();

    void setAllMpApp(List<MpApp> mpAppList);

    boolean delAllMpApp();

    MpApp getCacheMpAppById(String appId);

    void setCacheMpAppById(String appId, MpApp mpApp);

    boolean delCacheMpAppById(String appId);
}
